#pragma GCC optimize(2, "Ofast", "inline")
#include <iostream>
#include <vector>
#include <map>
#include <cmath>
#include <set>
#include<iomanip>
#include <queue>
#include <stack>
#include <list>
#include <unordered_map>
#include <algorithm>
#define endl '\n'
#define int long long
#define pii pair<int, int>
using namespace std;

// 已知
int x, y;
// 未知
int cnt = 0;
signed main()
{
    cin.tie(0)->sync_with_stdio(0);
    cin >> x >> y;
    for (int i = 1;i <= 6;++i)
    {
        for (int j = 1;j <= 6;++j)
        {
            if (i + j >= x or abs(i - j) >= y)
            {
                ++cnt;
            }
        }
    }
    cout << setprecision(9) << fixed << cnt / 36.0 << endl;
    return 0;
}